package tsi

import (
	watchmessgae "earth/watch_tcp/watch_message"
)

type TsiFunction struct {
	DealFuncs map[string]func(*watchmessgae.WatchMessage, string) error
}

func (t *TsiFunction) Init() {
	// 初始化函数映射表
	t.DealFuncs = map[string]func(*watchmessgae.WatchMessage, string) error{
		"KA":    DealKA,
		"UD":    DealUD,
		"ICCID": DealICCID,
		"DLT":   DealDLT,
		"AL":    DealAL,
		//"WT":    DealWT,
		//"WG":    DealWG,
		// 健康数据
		"temp":   DealHealthDataTemp,
		"oxygen": DealHealthDataOxygen,
		"blood":  DealHealthDataBlood,
		"heart":  DealHealthDataHeart,
	}
}
